/* 飞牛媒体库页面样式 */

/* 媒体库项样式 */
.library-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.library-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.library-poster {
    height: 180px;
    width: 100%;
    object-fit: cover;
    position: relative;
}

.library-info {
    padding: 1rem;
}

.library-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.library-stats {
    font-size: 0.875rem;
    color: #64748b;
}

/* 媒体条目样式 */
.media-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.media-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.media-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-bottom: 1px solid #e2e8f0;
}

.media-info {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: auto;
}

/* 加载状态样式 */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 媒体详情弹窗样式优化 */
#media-detail-modal {
    animation: fadeIn 0.3s ease;
}

#media-detail-modal .bg-white {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 详情页样式调整 */
#detail-content img {
    max-height: 450px;
    object-fit: contain;
    background-color: #f1f5f9;
}

#detail-title-full {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

#detail-info {
    color: #64748b;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .library-item {
        min-width: 100%;
    }
    
    #media-detail-modal .max-w-4xl {
        max-width: 90%;
    }
    
    #detail-content {
        grid-template-columns: 1fr !important;
    }
    
    #detail-content img {
        max-height: 300px;
        margin: 0 auto;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

/* 滚动条样式优化 */
#media-detail-modal::-webkit-scrollbar {
    width: 8px;
}

#media-detail-modal::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#media-detail-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#media-detail-modal::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}